package com.example.server.web.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author 作者
 * @since 2023-04-23
 */
@Getter
@Setter
@ApiModel(value = "Question对象", description = "")
public class Question implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "问题id",required = false)
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "问卷id",required = false)
    private Long questionnaireId;

    @ApiModelProperty(value = "问题题目内容",required = true)
    @NotBlank(message = "问题题目内容不能为空")
    private String content;

    @ApiModelProperty(value = "问题权重",required = false)
    private Double weight;

    @ApiModelProperty(value = "问卷的类型（1代表评分题，0代表文本题）",required = true)
    @NotNull(message = "问卷的类型不能为空")
    private Integer type;


}
